package activity

class Reader {
    String name
    String gender
    Date birth
    String CID
    String service
    String title
    String tel1
    String tel2
    String email1
    String email2
    String custom1
    String custom2
    String live
    String food
    String memo
    
    //static belongsTo = [event:Event]
    
    static constraints = {
        name(blank:false)
        gender(blank:false)
        birth(blank:false)
//        ,validator: {
//            try {
//                Date.parse('yyyy/M/d', it)
//                return true
//            } catch (Exception e) {
//                return false
//            }
//        })
        CID(nullable:true)
        service(nullable:true)
        title(nullable:true)
        tel1(nullable:true)
        tel2(nullable:true)
        email1(nullable:true)
        email2(nullable:true)
        custom1(nullable:true)
        custom2(nullable:true)
        live(nullable:true)
        food(nullable:true)
        memo(nullable:true)
    }
    
    String toString() {
        name
    }
}
